package com.funny.stock.base.exception;


import com.funny.stock.base.vo.ResultEnum;

/*
 * @author  pengl
 * @date    2020/4/9
 */
public class BizException extends RuntimeException {

    private Integer code;

    public BizException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public BizException(Integer code, String message) {
        super(message);//父类本身就有message
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
